<?php $this->extend('comm/page');?>

<?php $this->block('css'); ?>
<style>
#file-list {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative
}

#file-list .file-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin: 0 2px;
}
</style>
<?php $this->blockEnd(); ?>

<div class="panel panel-default panel-intro">
    <?php echo $this->build_heading(); ?>

    <div class="panel-body">
        <!-- 异常提示 -->
        <!-- <div class="alert alert-danger">错误！当前文件管理根路径不允许读写操作！！</div> -->
        <!-- 操作按钮 -->
        <div id="toolbar" class="toolbar">
            <a href="javascript:;" class="btn btn-primary btn-refresh"><i class="fa fa-refresh"></i></a>
            <a href="javascript:;" class="btn btn-warning btn-return">
                <i class="fa fa-reply"></i>
                返回上一级
            </a>
            <?php if($this->checkAuth('/admin/sys/filemanage/upload', $userInfo['id'])): ?>
            <a href="javascript:;" class="btn btn-info btn-upload">
                <i class="fa fa-upload"></i>
                上传文件
            </a>
            <?php endif; ?>
            <?php if($this->checkAuth('/admin/sys/filemanage/mkdir', $userInfo['id'])): ?>
            <a href="javascript:;" class="btn btn-default btn-mkdir">
                <i class="fa fa-plus"></i>
                新建文件夹
            </a>
            <?php endif; ?>
            <?php if($this->checkAuth('/admin/sys/filemanage/del', $userInfo['id'])): ?>
            <a href="javascript:;" class="btn btn-danger btn-remove">
                <i class="fa fa-remove"></i>
                删除文件
            </a>
            <?php endif; ?>
        </div>
        <p style="margin-top: 10px;">当前路径：<span id="nowPath"></span></p>
        <!-- 文件列表 -->
        <div id="file-list">
            <div class="mon-table-responsive">
                <table class="layui-table" lay-skin="line" id="table">
                    <thead>
                        <tr>
                            <td style="width: 20px;"><input type="checkbox" id="selectedAll" lay-skin="primary"></td>
                            <th style="min-width: 240px;">文件名</th>
                            <th style="width: 100px;">大小</th>
                            <th style="width: 168px;">修改时间</th>
                        </tr>
                    </thead>
                    <tbody>
                        <!-- <tr class="item">
                            <td><input type="checkbox" name="selected" lay-skin="primary"></td>
                            <td>
                                <div class="file-icon"><img src="/static/img/filemanage/folder.png" alt=""></div>
                                <a href="javascript:void(0);">static</a>
                            </td>
                            <td>1.23G</td>
                            <td>1920-09-30 12:18</td>
                        </tr>
                        <tr class="item">
                            <td><input type="checkbox" name="selected" lay-skin="primary"></td>
                            <td>
                                <div class="file-icon"><img src="/static/img/filemanage/file.png" alt=""></div>
                                <span>index.html</span>
                            </td>
                            <td>999.9M</td>
                            <td>1989-10-14 12:18</td>
                        </tr>
                        <tr class="item">
                            <td><input type="checkbox" name="selected" lay-skin="primary"></td>
                            <td>
                                <div class="file-icon"><img src="/static/img/filemanage/img.png" alt=""></div>
                                <span>index.png</span>
                            </td>
                            <td>0.9M</td>
                            <td>1989-10-14 12:18</td>
                        </tr> -->
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>

<?php $this->block('js'); ?>
<script>
    window.setting = <?php echo $setting;?>
</script>
<?php $this->blockEnd(); ?>